package main

import "fmt"

func twoSum(numbers []int, target int) []int {
	mapIdx := map[int]int{}
	for i := 0; i < len(numbers); i++ {
		if idx, ok := mapIdx[numbers[i]]; ok {
			return []int{idx + 1, i + 1}
		}
		mapIdx[target-numbers[i]] = i
	}
	return []int{0, 0}
}
func main() {
	fmt.Println(twoSum([]int{2, 7, 11, 15}, 9))
}
